package com.mer.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.mer.entity.Course;
import com.mer.vo.CourseVo;
import com.mer.vo.ModifyCourseVo;
import org.apache.ibatis.annotations.Param;

/**
 * @program: IIPhase-project
 * @description: 课程列表Mapper层
 * @author: 陈铠
 * @create: 2021-10-20 19:49
 **/
public interface CourseMapper extends BaseMapper<Course> {
    /**
     * 查询通过审核的课程
     * @param page
     * @param queryWrapper
     * @param id
     * @return
     */
    Page<CourseVo> selectPassedCourse(@Param("page") Page<CourseVo> page, @Param("ew") QueryWrapper queryWrapper, @Param("id") String id);

    /**
     * 修改课程信息
     * @param modifyCourseVo
     * @return
     */
    int modifyCourse(ModifyCourseVo modifyCourseVo);

    int changeStatus(@Param("id") String id, @Param("status") String status);
}
